package experiments
{
	import __AS3__.vec.Vector;
	
	public class ExperimentCollection
	{
		private var _vecGenerators:Vector.<Hypothesis>
		
		private var _nExperimentsCount:int = 0;
		
		public function ExperimentCollection()
		{
			_vecGenerators = new Vector.<Hypothesis>();
		}
		
		public function addExperiment(strName:String, func:Function, nMinValue:Number, nMaxValue:Number):void
		{
			var generator:Hypothesis = new Hypothesis(strName, func, nMinValue, nMaxValue);
			_vecGenerators.push(generator);				
		}
		
		public function nextExperiment():void
		{
			_nExperimentsCount++;
			
			for each(var generator:Hypothesis in _vecGenerators)
			{
				generator.update();
			}
		}
		
		public function get numExperiments():int { return _nExperimentsCount;}
		
		public function get numHypothesis():int { return _vecGenerators.length;}
		public function getHypothesisAt(nIndex:int):Hypothesis { return _vecGenerators[nIndex];}
	}
}